<%@page import="com.test.database.DBUtil"%>
<%@ page language="java" import="java.util.*, java.sql.*,com.test.database.ConnectionFactory" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>修用例信息</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link href="style.css" rel="stylesheet" type="text/css">
		
		<style>
		tr{
		 text-align:center;
		</style>
		
	</head>

	<body>
	<%!Connection conn = null; 
		Statement stmt = null;
		ResultSet rs = null;
	%>
	<% 
		conn = DBUtil.getConn();
		stmt = conn.createStatement();
		rs = stmt.executeQuery("select * from tb_article_info where id='" + request.getParameter("id") + "'");
		if(rs.next()){
	%>
	<center>
		<form action="/Test_Project/com/test/servlet/updateTestcase">
			 <table border="3" bordercolor="green">
                    <tr>
                        <td colspan="2" bgcolor="#CEDDEC" align="center">
                            <font color="green" size="6">修改测试用例信息</font>
                        </td>
                    </tr>
                    <tr >
                        <td width="150">
                            用例编号：
                        </td>
                        <td  width="200">
                            <input type="text" readonly="readonly" name="count" placeholder="用例编号" value="<%=rs.getInt("id") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            用例标题：
                        </td>
                        <td width="400">
                            <input type="text" name="updatetitle" placeholder="用例标题" value="<%=rs.getString("title") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            测试用户：
                        </td>
                        <td width="400">
                            <input type="text" name="updatename"placeholder="测试用户" value="<%=rs.getString("name") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            测试类型：
                        </td>
                        <td width="400">
                            <input type="text" name="updatetype" placeholder="测试类型" value="<%=rs.getString("type") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            测试内容：
                        </td>
                        <td width="400">
                            <input type="text" name="updatetext" placeholder="测试内容" value="<%=rs.getString("text1") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            预期结果：
                        </td>
                        <td width="400">
                            <input type="text" name="ueResults" placeholder="预期结果" value="<%=rs.getString("expectResults") %>">
                        </td>
                    </tr>
                    <tr>
                        <td width="100">
                            实际结果：
                        </td>
                        <td width="400">
                            <input type="text" name="uaResults" placeholder="实际结果" value="<%=rs.getString("actualResults") %>">
                        </td>
                    </tr>
                  <%  }
                		
                	%>
                    <tr>
                        <td align="center" colspan="2">
                            <input type="submit" value="修改" style="width: 60; height: 30; color: purple" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="reset" value="重置" style="width: 60; height: 30; color: purple" />
                        </td>
                    </tr>
                </table>
		</form>
		</center>
	</body>
</html>
